from applications.extensions import ma
from marshmallow import fields

class YeGroupSchema(ma.Schema):
    id = fields.Integer()
    name = fields.Str()
    sort = fields.Integer()
    type = fields.Str()
    remarks = fields.Str()
    parent_id = fields.Str()
    create_time =fields.DateTime()
    update_time = fields.DateTime()

    group_list = fields.Nested('self', exclude=('group_list', ), default=None, many=True)
